package net.sos.translator;

import java.util.Collection;

/**
 * This interface defines a contract for translating the contents of a given
 * Collection instance.
 * 
 * @author SANJAY
 * 
 */
public interface ICollectionTranslator {

   void setTranslator(ITranslator translator);

   // Anything which implements CharSequence is good enough for us; we don't
   // need to do something loony like using wildcards <? extends CharSequence>
   // since it would be a real PITA when it comes to adding elements to it.
   // Just in case you don't know, you can't!
   // And if you are wondering why I ended up using wildcards when declaring the
   // method parameters; it's because this method should work when passed, let's
   // say, an instance of a Set<String>.
   Collection<CharSequence> translate(
         Collection<? extends CharSequence> collection) throws TranslationException;

}
